package greaderbook.backend;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

/**
 * Class for handling all the data (username, password, articles etc) in GreaderBook.
 * @author Jia Cherng Ho
 *
 */
public class GreaderBookDB {
	private static final String CREATE_USER = "create table users (username text not null, password text not null)";
	private static final String DB_NAME = "GreaderBookDB";
	private SQLiteDatabase db;
	
	/**
	 * GreaderBookDB constructor. Open or create database if it doesn't exist.
	 * @param ctx	the activity using the database
	 */
	public GreaderBookDB(Context ctx) {
		db = ctx.openOrCreateDatabase(DB_NAME, 0, null);
		db.execSQL(CREATE_USER);
	}

	/**
	 * Save current user's gmail credentials and SID
	 * @param user	gmail username
	 * @param pass	gmail password
	 * @param sid	SID retrieved from Google Reader API
	 */
	public void insert(String user, String pass, String sid) {
		
	}
}
